import request from '@/utils/request'

export default{
    //添加课程
    getAllChapterVideo(courseId){
    return request({
        url: `/eduservice/edu-chapter/getChapterVideo/${courseId}`,
        method: 'get',
        
    })
    },
    //添加章节
    addChapter (eduChapter){
        return request({
            url: `/eduservice/edu-chapter/addChapter`,
            method: 'post',
            data: eduChapter
            
        })
        },
        //通过id查询章节
        getChapterByid(id){
            return request({
                url: `/eduservice/edu-chapter/getChapterByid/${id}`,
                method: 'get',
                
            })
            },
        //修改章节
        updateChapter(chapter){
                return request({
                    url: `/eduservice/edu-chapter/updateChapter`,
                    method: 'post',
                    data:chapter
                    
                })
                },
                  //删除章节
        deleteChapter(id){
            return request({
                url: `/eduservice/edu-chapter/deleteChapter/${id}`,
                method: 'delete',
                
                
            })
            }
                

}
